(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
active(tail(cons(X, XS))) → mark(XS)
active(cons(X1, X2)) → cons(active(X1), X2)
active(tail(X)) → tail(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
tail(mark(X)) → mark(tail(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(tail(X)) → tail(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
tail(ok(X)) → ok(tail(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
active(zeros) → mark(cons(0', zeros))
active(tail(cons(X, XS))) → mark(XS)
active(cons(X1, X2)) → cons(active(X1), X2)
active(tail(X)) → tail(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
tail(mark(X)) → mark(tail(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0') → ok(0')
proper(tail(X)) → tail(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
tail(ok(X)) → ok(tail(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
S is empty.
Rewrite Strategy: FULL
(3) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(4) Obligation:
TRS:
Rules:
active(zeros) → mark(cons(0', zeros))
active(tail(cons(X, XS))) → mark(XS)
active(cons(X1, X2)) → cons(active(X1), X2)
active(tail(X)) → tail(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
tail(mark(X)) → mark(tail(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0') → ok(0')
proper(tail(X)) → tail(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
tail(ok(X)) → ok(tail(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
(5) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
active,
cons,
tail,
proper,
topThey will be analysed ascendingly in the following order:
cons < active
tail < active
active < top
cons < proper
tail < proper
proper < top
(6) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
The following defined symbols remain to be analysed:
cons, active, tail, proper, top
They will be analysed ascendingly in the following order:
cons < active
tail < active
active < top
cons < proper
tail < proper
proper < top
(7) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
cons(
gen_zeros:0':mark:ok3_0(
+(
1,
n5_0)),
gen_zeros:0':mark:ok3_0(
b)) →
*4_0, rt ∈ Ω(n5
0)
Induction Base:
cons(gen_zeros:0':mark:ok3_0(+(1, 0)), gen_zeros:0':mark:ok3_0(b))
Induction Step:
cons(gen_zeros:0':mark:ok3_0(+(1, +(n5_0, 1))), gen_zeros:0':mark:ok3_0(b)) →RΩ(1)
mark(cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b))) →IH
mark(*4_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(8) Complex Obligation (BEST)
(9) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
The following defined symbols remain to be analysed:
tail, active, proper, top
They will be analysed ascendingly in the following order:
tail < active
active < top
tail < proper
proper < top
(10) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
tail(
gen_zeros:0':mark:ok3_0(
+(
1,
n710_0))) →
*4_0, rt ∈ Ω(n710
0)
Induction Base:
tail(gen_zeros:0':mark:ok3_0(+(1, 0)))
Induction Step:
tail(gen_zeros:0':mark:ok3_0(+(1, +(n710_0, 1)))) →RΩ(1)
mark(tail(gen_zeros:0':mark:ok3_0(+(1, n710_0)))) →IH
mark(*4_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(11) Complex Obligation (BEST)
(12) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
tail(gen_zeros:0':mark:ok3_0(+(1, n710_0))) → *4_0, rt ∈ Ω(n7100)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
The following defined symbols remain to be analysed:
active, proper, top
They will be analysed ascendingly in the following order:
active < top
proper < top
(13) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol active.
(14) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
tail(gen_zeros:0':mark:ok3_0(+(1, n710_0))) → *4_0, rt ∈ Ω(n7100)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
The following defined symbols remain to be analysed:
proper, top
They will be analysed ascendingly in the following order:
proper < top
(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol proper.
(16) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
tail(gen_zeros:0':mark:ok3_0(+(1, n710_0))) → *4_0, rt ∈ Ω(n7100)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
The following defined symbols remain to be analysed:
top
(17) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol top.
(18) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
tail(gen_zeros:0':mark:ok3_0(+(1, n710_0))) → *4_0, rt ∈ Ω(n7100)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
No more defined symbols left to analyse.
(19) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
(20) BOUNDS(n^1, INF)
(21) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
tail(gen_zeros:0':mark:ok3_0(+(1, n710_0))) → *4_0, rt ∈ Ω(n7100)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
(23) BOUNDS(n^1, INF)
(24) Obligation:
TRS:
Rules:
active(
zeros) →
mark(
cons(
0',
zeros))
active(
tail(
cons(
X,
XS))) →
mark(
XS)
active(
cons(
X1,
X2)) →
cons(
active(
X1),
X2)
active(
tail(
X)) →
tail(
active(
X))
cons(
mark(
X1),
X2) →
mark(
cons(
X1,
X2))
tail(
mark(
X)) →
mark(
tail(
X))
proper(
zeros) →
ok(
zeros)
proper(
cons(
X1,
X2)) →
cons(
proper(
X1),
proper(
X2))
proper(
0') →
ok(
0')
proper(
tail(
X)) →
tail(
proper(
X))
cons(
ok(
X1),
ok(
X2)) →
ok(
cons(
X1,
X2))
tail(
ok(
X)) →
ok(
tail(
X))
top(
mark(
X)) →
top(
proper(
X))
top(
ok(
X)) →
top(
active(
X))
Types:
active :: zeros:0':mark:ok → zeros:0':mark:ok
zeros :: zeros:0':mark:ok
mark :: zeros:0':mark:ok → zeros:0':mark:ok
cons :: zeros:0':mark:ok → zeros:0':mark:ok → zeros:0':mark:ok
0' :: zeros:0':mark:ok
tail :: zeros:0':mark:ok → zeros:0':mark:ok
proper :: zeros:0':mark:ok → zeros:0':mark:ok
ok :: zeros:0':mark:ok → zeros:0':mark:ok
top :: zeros:0':mark:ok → top
hole_zeros:0':mark:ok1_0 :: zeros:0':mark:ok
hole_top2_0 :: top
gen_zeros:0':mark:ok3_0 :: Nat → zeros:0':mark:ok
Lemmas:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
Generator Equations:
gen_zeros:0':mark:ok3_0(0) ⇔ zeros
gen_zeros:0':mark:ok3_0(+(x, 1)) ⇔ mark(gen_zeros:0':mark:ok3_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
cons(gen_zeros:0':mark:ok3_0(+(1, n5_0)), gen_zeros:0':mark:ok3_0(b)) → *4_0, rt ∈ Ω(n50)
(26) BOUNDS(n^1, INF)